package com.zry.pda.ui.activity

import com.zry.pda.R
import com.zry.pda.databinding.ActivityPackingOperationBinding
import com.zry.pda.presenter.PackingOperationPresenter
import com.zry.pda.ui.base.BaseActivity
import kotlinx.android.synthetic.main.activity_packing_operation.*
import kotlinx.android.synthetic.main.common_title.*


class PackingOperationActivity : BaseActivity() {
    private var packingOperationBinding: ActivityPackingOperationBinding? = null
    private var packingOperationPresenter: PackingOperationPresenter? = null
    override fun getLayoutId(): Int {
        return R.layout.activity_packing_operation
    }

    override fun initData() {


        titleCenterText.text = "装箱打包"
        commonLeftLinearLayout.setOnClickListener { finish() }

        packingOperationBinding = viewDataBinding as ActivityPackingOperationBinding
        packingOperationPresenter = PackingOperationPresenter(this)
        packingOperationBinding?.handlerClick = packingOperationPresenter

        initSpinner()
    }

    private fun initSpinner() {
        packingOperationPresenter?.initBoxingLevel(boxingLevelSpinner)
        packingOperationPresenter?.getProductList()

    }

}
